<template>
	<view class="comment">
		<view class="cu-list menu-avatar comment solids-top">
			<view class="cu-item" v-for="item in commentList" :key="item.id">
				<!-- <block v-if="item.reply_to == 0"> -->
					<view class="cu-avatar round" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Morgana.png);"></view>
					<view class="content">
						<view class="text-grey">{{item.nickname}}</view>
						<view class="text-gray text-content text-df">{{item.content}}</view>
						<block v-if="item.son.length > 0" v-for="sonItem in item.son" :key="sonItem.id">
							<view class="bg-grey padding-sm radius margin-top-sm  text-sm">
								<view class="flex">
									<view>十姑娘：</view>
									<view class="flex-sub">{{sonItem.content}}</view>
								</view>
							</view>
							<view class="margin-top-sm flex justify-between">
								<view class="text-gray text-df">2018年12月4日</view>
								<view>
									<text class="cuIcon-appreciatefill text-red">12</text>
									<text class="cuIcon-messagefill text-gray margin-left-sm" @click="getContentUserInfo(item)">22</text>
								</view>
							</view>
						</block>
					</view>
				<!-- </block> -->
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props:{
		commentList: {
			type: Array,
			default: []
		}
	},
	data() {
		return {
			list:[1,2,3,4,5,6]
		};
	},
	methods:{
		getContentUserInfo(userInfo){
			this.$u.vuex('replyUserInfo', userInfo);
			console.log(this)
		},
	},
};
</script>

<style lang="less" scoped>
	.comment{
		margin-bottom: 50px;
	}
</style>
